<?php


namespace seecms\lib\builder\query;

use seecms\lib\builder\control\DateControl;

class DateQuery extends DateControl
{

    use Query;

    public function getExpress(): string
    {
        return 'date';
    }

    /**
     * @return bool
     */
    public function isRange(): bool
    {
        return $this->range;
    }

    /**
     * @param bool $range
     * @return $this
     */
    public function setRange(bool $range = true)
    {
        $this->range = $range;
        $this->size = 4;

        return $this;
    }

    /**
     * @return mixed|string
     */
    public function getFormat(): string
    {
        return $this->format;
    }
}